<div class="case-selection-inner modal-content-inner">
  <div class="modal-header">
    <h4 class="modal-title">请选择用例</h4>

    <button type="button" class="btn btn-primary confirm-btn" (click)="save()">确认</button>
    &nbsp;&nbsp;
    <button type="button" class="btn btn-secondary" (click)="dismiss()">取消</button>
  </div>
  <div class="modal-body">
    <div class="cols">
      <div class="modules">
        <ztree
          [projectId]="caseProjectId"
          [treeModel]="treeModel"
          [treeSettings]="treeSettings"
          [brotherProjects]="brotherProjects"
          (projectChanged)="changeProject($event)">
        </ztree>
      </div>

      <div class="filter">
        <div class="ztree-toolbar">
          <span>过滤器</span>
          <span (click)="resetFilters()" class="link">全部复位</span>
        </div>
        <div class="content">
          <form [formGroup]="form">
            <div id="accordion" role="tablist" aria-multiselectable="true">
              <div class="card">
                <div class="card-header" role="tab" id="headingType">
                  <div class="mb-0">
                    <a data-toggle="collapse" data-parent="#accordion1" href="#collapseType" aria-expanded="true" aria-controls="collapseOne">
                      特性
                    </a>
                  </div>
                </div>
                <div id="collapseType" class="collapse show" role="tabpanel" aria-labelledby="headingType">
                  <div class="card-block">

                    <div class="form-group row">
                      <label class="col-3 col-form-label">类型</label>
                      <div class="col-9">
                        <div class="form-check  form-check-inline">

                          <label class="col-form-label form-check-label">
                            <input [(ngModel)]="queryModel.type.functional" formControlName="type" name="functional"
                                   class="form-check-input" type="checkbox" value="functional">功能
                          </label>

                          <label class="col-form-label form-check-label">
                          <input [(ngModel)]="queryModel.type.performance" formControlName="type" name="performance"
                                 class="form-check-input" type="checkbox" value="performance">性能
                          </label>

                          <label class="col-form-label form-check-label">
                            <input [(ngModel)]="queryModel.type.security" formControlName="type" name="security"
                                   class="form-check-input" type="checkbox" value="security">安全
                          </label>

                          <label class="col-form-label form-check-label">
                            <input [(ngModel)]="queryModel.type.other" formControlName="type" name="other"
                                   class="form-check-input" type="checkbox" value="other">其他
                          </label>

                        </div>
                      </div>
                    </div>

                    <div class="form-group row">
                      <label class="col-3 col-form-label">优先级</label>
                      <div class="col-9">
                        <div class="form-check  form-check-inline">

                          <label class="col-form-label form-check-label">
                            <input [(ngModel)]="queryModel.priority.high" formControlName="priority" name="high"
                                   class="form-check-input" type="checkbox" value="1">高
                          </label>

                          <label class="col-form-label form-check-label">
                            <input [(ngModel)]="queryModel.priority.middle" formControlName="priority" name="middle"
                                   class="form-check-input" type="checkbox" value="2">中
                          </label>

                          <label class="col-form-label form-check-label">
                            <input [(ngModel)]="queryModel.priority.low" formControlName="priority" name="low"
                                   class="form-check-input" type="checkbox" value="3">低
                          </label>

                        </div>
                      </div>
                    </div>

                    <div class="form-group row">
                      <label class="col-3 col-form-label">耗时</label>
                      <div class="col-9">
                        <select [(ngModel)]="queryModel.estimate" formControlName="estimate" class="form-control form-control-sm" name="estimate">
                          <option value=""></option>
                          <option value="0-15">少于15分钟</option>
                          <option value="15-20">15-30分钟</option>
                          <option value="30-60">30-60分钟</option>
                          <option value="60-600">大于1小时</option>
                        </select>
                      </div>
                    </div>

                  </div>
                </div>
              </div>
              <div class="card">
                <div class="card-header" role="tab" id="headingTime">
                  <div class="mb-0">
                    <a data-toggle="collapse" data-parent="#accordion4" href="#collapseTime" aria-expanded="true" aria-controls="collapseTime">
                      时间
                    </a>
                  </div>
                </div>
                <div id="collapseTime" class="collapse show" role="tabpanel" aria-labelledby="headingCreate">
                  <div class="card-block">
                    <div class="form-group row">
                      <label class="col-3 col-form-label">创建于</label>
                      <div class="col-9">
                        <select [(ngModel)]="queryModel.createTime" formControlName="createTime" class="form-control form-control-sm" name="createTime">
                          <option value=""></option>
                          <option value="1">1天内</option>
                          <option value="3">3天内</option>
                          <option value="7">1周内</option>
                          <option value="31">1月内</option>
                        </select>
                      </div>
                    </div>
                    <div class="form-group row">
                      <label class="col-3 col-form-label">更新于</label>
                      <div class="col-9">
                        <select [(ngModel)]="queryModel.updateTime" formControlName="updateTime" class="form-control form-control-sm" name="updateTime">
                          <option value=""></option>
                          <option value="1">1天内</option>
                          <option value="3">3天内</option>
                          <option value="7">1周内</option>
                          <option value="31">1月内</option>
                        </select>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <div class="card">
                <div class="card-header" role="tab" id="headingUser">
                  <div class="mb-0">
                    <a data-toggle="collapse" data-parent="#accordion5" href="#collapseUser" aria-expanded="true" aria-controls="collapseUser">
                      用户
                    </a>
                  </div>
                </div>
                <div id="collapseUser" class="collapse show" role="tabpanel" aria-labelledby="headingUpdate">
                  <div class="card-block">
                    <div class="form-group row">
                      <label class="col-3 col-form-label">创建人</label>
                      <div class="col-9">
                        <ng-select  [multiple]="true"
                                    [items]="users"
                                    [(active)]="createUsers"
                                    [idField]="'id'"
                                    [textField]="'nickname'"
                                    [disabled]="disabled"
                                    (data)="refreshCreateBy($event)"
                                    placeholder="请选择"></ng-select>
                      </div>
                    </div>
                    <div class="form-group row">
                      <label class="col-3 col-form-label">最后更新</label>
                      <div class="col-9">
                        <ng-select  [multiple]="true"
                                    [items]="users"
                                    [(active)]="updateUsers"
                                    [idField]="'id'"
                                    [textField]="'nickname'"
                                    [disabled]="disabled"
                                    (data)="refreshUpdateBy($event)"
                                    placeholder="请选择"></ng-select>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>


